

function initCreatePhanquyen()
{	  
    $('#form_create_phanquyen').ajaxForm({
    	beforeSubmit:function(){   		
    		showLoader($('#form_create_phanquyen'));
    	},
    	success:function(response){
    		var obj = checkJSON(response);
    		if(obj.is_json)
    		{
    			if(!obj.result.success)
        		{
        			var error = obj.result.error;
        			alertify.alert(error);
        		}
    		}
    		else
    		{
    			$('#form_create_phanquyen').closest("div.modal").find("div.modal-header button.close").trigger("click");
    			alertify.set({ delay: 4000 });
				alertify.success("Lưu thành công");
    				
    		}
    		hideLoader($('#form_create_phanquyen'));
    	}
    });
}
